package com.himilco.ocana.workflow.core.bo;

import com.himilco.ocana.workflow.core.dao.OperatorDAL;
import com.himilco.ocana.workflow.core.dao.entities.Ticket;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
public class OperatorBO {

    @PersistenceContext(unitName = "PU_OCANA")
    EntityManager em;
    private OperatorDAL operatorDAL;

    public List<Ticket> findAllTickets() {
        OperatorDAL od = new OperatorDAL(em);
        return od.findAll();
    }

    public void updateTicket(Ticket t) {
        OperatorDAL od = new OperatorDAL(em);
        od.updateTicket(t);
    }
}
